﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using System.Text.RegularExpressions;

namespace ReporterApplication
{
    public static class word
    {
        static word()
        {

        }

        public static string doit(string input)
        {
            return null;
        }

        public static readonly string ParameterCharacters = "\\(\\,\\)\\/\\s\\w";
        public static readonly string SeparatorCharacters = "\\$\\#";

        public static readonly string filterRegexString = "\\w\\s\\'\\’\\[\\]\\*\\=\\&\\|\\.\\!\\^\\~";
        public static readonly string expRegexString = "\\w\\s\\=\\'\\’\\[\\]\\*\\.\\!\\^\\~";
        public static readonly string paramRegexString = "\\[\\]\\s\\w\\.\\'\\’";

        public static readonly Regex findCommand = new Regex("\\{(?<command>[\\w\\s]*)\\$(?<parameters>[\\+\\w\\s\\#\\$\\(\\)\\,]*)(?<filter>\\?[" + filterRegexString + "]+)?\\}");

        public static readonly Regex findNonAlpha = new Regex("[^\\s\\w]");

        public static readonly Regex findNonAlphaNonSpace = new Regex("[^\\w]");
        //public static readonly Regex findNonAlphaNonSpace = new Regex("[^\\w]");

        public static readonly Regex findNonAlphaCommand = new Regex("[^" + ParameterCharacters + "]");

        public static readonly Regex findSeparator = new Regex("[" + SeparatorCharacters + "]");

        public static readonly XName p = XName.Get("p", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
        public static readonly XName r = XName.Get("r", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
        public static readonly XName t = XName.Get("t", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");

        public static readonly XName rsidR = XName.Get("rsidR", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
        public static readonly XName rsidP = XName.Get("rsidP", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
        public static readonly XName rsidRPr = XName.Get("rsidRPr", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");

        public static readonly XName proofErr = XName.Get("proofErr", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");

        public static readonly XName blip = XName.Get("blip", "http://schemas.openxmlformats.org/drawingml/2006/main");
        public static readonly XName attribute_embed = XName.Get("embed", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");

        public static readonly XName tr = XName.Get("tr", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");

        public static readonly List<string> ParameterCommands = new List<string>() { "text", "date", "number" };
        public static readonly List<string> RepeatingCommands = new List<string>() { "row", "section", "endsection", "column", "list" };

        public static readonly string StartSectionCommand = "section";
        public static readonly string EndSectionCommand = "endsection";


    }
}
